package vip.liux.contracts.shared.value;

import vip.liux.contracts.models.coupon.UserCoupon;

/**
 * Projection for {@link UserCoupon}
 */
public interface ReceivedRecord {
    /**
     * 优惠券编号
     */
    String getCouponNo();

    /**
     * 领取数量
     */
    Long getReceivedCount();

    /**
     * 领取人数
     */
    Long getReceivedCountPerson();

    static ReceivedRecord empty(String couponNo) {
        return new Empty(couponNo);
    }

    record Empty(String getCouponNo) implements ReceivedRecord {

        @Override
        public Long getReceivedCount() {
            return 0L;
        }

        @Override
        public Long getReceivedCountPerson() {
            return 0L;
        }
    }
}